﻿#region << 文 件 说 明 >>

/*----------------------------------------------------------------
// 文件名称：ButtonHave_Popup
// 创 建 者：杨程
// 创建时间：2021/9/2 13:08:15
// 文件版本：V1.0.0
// ===============================================================
// 功能描述：
//
//
//----------------------------------------------------------------*/

#endregion

namespace Vampirewal.Core.WPF.Theme;

public class ButtonHave_Popup : DependencyObject
{
    public static bool GetIsHavePopup(DependencyObject obj)
    {
        return (bool)obj.GetValue(IsHavePopupProperty);
    }

    public static void SetIsHavePopup(DependencyObject obj, bool value)
    {
        obj.SetValue(IsHavePopupProperty, value);
    }

    // Using a DependencyProperty as the backing store for IsHavePopup.  This enables animation, styling, binding, etc...
    public static readonly DependencyProperty IsHavePopupProperty =
        DependencyProperty.RegisterAttached("IsHavePopup", typeof(bool), typeof(ButtonHave_Popup), new PropertyMetadata(false, OnIsHavePopupPropertyChangedCallBack));

    private static void OnIsHavePopupPropertyChangedCallBack(DependencyObject d, DependencyPropertyChangedEventArgs e)
    {
    }

    public static ControlTemplate GetPopupTemplate(DependencyObject obj)
    {
        return (ControlTemplate)obj.GetValue(PopupTemplateProperty);
    }

    public static void SetPopupTemplate(DependencyObject obj, ControlTemplate value)
    {
        obj.SetValue(PopupTemplateProperty, value);
    }

    // Using a DependencyProperty as the backing store for PopupTemplate.  This enables animation, styling, binding, etc...
    public static readonly DependencyProperty PopupTemplateProperty =
        DependencyProperty.RegisterAttached("PopupTemplate", typeof(ControlTemplate), typeof(ButtonHave_Popup), new PropertyMetadata(null));
}